# Maintainer: Ivy Foster <iff@archlinux.org>
# Maintainer: T.J. Townsend <blakkheim@archlinux.org>
# Contributor: Alex Szczuczko <alex at szc dot ca>
# Contributor: Devin Cofer <ranguvar{AT]archlinux[DOT}us>
# Contributor: Imanol Celaya <ilcra1989@gmail.com>

pkgname=bmake
pkgver=20230414
pkgrel=1
pkgdesc='Portable version of the NetBSD make build tool'
arch=(loong64 x86_64)
url='https://www.crufty.net/help/sjg/bmake.html'
license=(BSD)
optdepends=('python: for meta2deps.py script')
#source=("https://ftp.netbsd.org/pub/NetBSD/misc/sjg/bmake-$pkgver.tar.gz"{,.asc})
source=("https://www.crufty.net/ftp/pub/sjg/bmake-$pkgver.tar.gz"{,.asc})
sha256sums=('29cb1d26aae7de9def92bdaeb3aad4520e89951ce97b2e75f0b89bae1b95399f'
            'SKIP')
validpgpkeys=(7E228507C26D8DC164F531BFBA54C8AF755A2A99)

build() {
  cd bmake
  ./boot-strap --prefix=/usr op=build
}

package() {
  cd bmake
  ./boot-strap --install-destdir="$pkgdir" --prefix=/usr op=install
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
